﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Microsoft.Win32;

namespace WpfTestApplication
{
    /// <summary>
    /// Interaction logic for WindowModalTestWindow.xaml
    /// </summary>
    public partial class WindowModalTestWindow : Window
    {
        public WindowModalTestWindow()
        {
            InitializeComponent();
        }

        private void btnOpenFile_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog { Multiselect = false, Title = "Open my file" };
            if (ofd.ShowDialog(this).Value)
            {
                MessageBox.Show("File Opened");
            } 
            else
            {
                MessageBox.Show("Canceled");
            }
        }

        private void btnMsgBox_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Hello world");
        }
    }
}
